<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/23
 * Time: 21:17
 */

namespace app\common\model;

/**
 * 会员返佣
 * Class UserRebate
 * @package app\common\model
 */
class UserRebate extends Base
{
    protected $table = 'user_rebate';
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';


    /**
     * 状态
     * @var array
     */
    public $status = [
        1 => '已返佣',
        2 => '未返佣',
        3 => '已驳回'
    ];

    /**
     * 取得状态属性名称
     * @param $key
     * @param $value
     * @return mixed|string
     */
    public function getStatusNameAttr($key, $value)
    {
        return isset($this->status[$value['status']]) ? $this->status[$value['status']] : '';
    }


}